import React from "react";

/**
 * 加载图片或样式文件
 * */
import './sass/FootSubmitBtn.scss';
import Price from '../Price/Price';


export default class FootSubmitBtn extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            // sidebarVisible: false
        }
    }

    render() {
        const {price, submitFlag, btnText, submitFn, score} = this.props;
        return (
            <div className="foot-submit">
                <span className="price-box color-6">总价: <Price num={price} isScore={score}/></span>
                <span className={"submit " + (submitFlag ? "" : "disabled")}
                      onClick={submitFn}
                >{btnText || "确认"}</span>
            </div>
        )
    }
}